The Rails View (for Roman Fäckl) by John Athayde & Bruce Williams

The Rails View (for Roman Fäckl) by John Athayde & Bruce Williams

Author:John Athayde & Bruce Williams
Language: eng
Format: epub
Tags: Pragmatic Bookshelf
ISBN: 978-1-93435-687-6
Publisher: The Pragmatic Bookshelf, LLC (351417)


Show Me the Page

Sometimes when we encounter an error or an unexpected step failure, we may want to see what the content of the actual page that Cucumber is interacting with looks like.

We can do this by adding a step definition that calls the Capybara method save_and_open_page, for instance:

​​Then /^show me the page$/ do​​

​​ save_and_open_page​​

​​end​​

When Cucumber executes this step (and the Launchy library is installed), Capybara will pop up a browser window, showing the page content. We won’t be able to interact with the page (since our application isn’t running), but we can view the source and verify that the page looks as expected or fix our step definitions to suit.[83]



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.